package com.europe.business.europebusiness.ui.activity;

import com.europe.business.europebusiness.R;
import com.europe.business.europebusiness.ui.bean.ProvinceBean;
import com.europe.business.europebusiness.ui.net.ICompany;
import com.europe.business.europebusiness.ui.utils.NetUtils;
import com.europe.business.europebusiness.ui.utils.Utils;

import retrofit2.Call;

public class CityActivity extends ListActivity1<ProvinceBean,ProvinceBean.Country> {

    private  int countryId;

    @Override
    protected void initView() {
        super.initView();
        setTitle(R.string.info_select_city);
        setToolbarNavigationIcon(R.drawable.actionbar_back);
        countryId=getIntent().getIntExtra("countryId",-1);
    }

    @Override
    protected void getData(final int pageNum,int pageSize) {
        if (pageNum == 1) {
            showProgressDialog();
        }
        ICompany company=NetUtils.getRetrofit().create(ICompany.class);
        Call<ProvinceBean> call=company.getProvinceList(countryId,pageNum,pageSize,Utils.getSystemLanguage(this));
        call.enqueue(getCallback());
    }

}
